# PRODUCT INFO
skip_phases = ["buildinstall", "extra_files"]
release_name = '[[ release.id_prefix.title() ]]'
release_short = '[[ release.id_prefix.title() ]]'
release_version = '[[ release.version_int ]]'
release_type = 'updates[% if request.name == 'testing' %]-testing[% endif %]'
release_is_layered = False
old_composes_per_release_type = True

# GENERAL SETTINGS
comps_file = {
    'scm': 'git',
    'repo': 'https://pagure.io/fedora-comps.git',
    'branch': 'main', # defaults to cvs/HEAD or git/main
    'file': 'comps-[[ release.branch ]].xml',
    'command': 'make',
}
variants_file='variants.xml'
sigkeys = [
[% if release.version_int == 25 %]
    'fdb19c98',
[% elif release.version_int == 26 %]
    '64dab85d',
[% elif release.version_int == 27 %]
    'f5282ee4',
[% elif release.version_int == 28 %]
    '9db62fb1',
[% elif release.version_int == 30 %]
    'cfc659b9',
[% elif release.version_int == 31 %]
    '3c3359c4',
[% elif release.version_int == 32 %]
    '12c944d0',
[% elif release.version_int == 33 %]
    '9570ff31',
[% elif release.version_int == 34 %]
    '45719a39',
[% elif release.version_int == 35 %]
    '9867c58f',
[% elif release.version_int == 36 %]
    '38ab71f4',
[% elif release.version_int == 37 %]
    '5323552a',
[% elif release.version_int == 38 %]
    'eb10b464',
[% elif release.version_int == 6 %]
    '0608b895',
[% elif release.version_int == 7 %]
    '352C64E5',
[% elif release.version_int == 8 %]
    '2f86d6a1'
[% elif release.version_int == 9 %]
    '3228467c'
[% endif %]
{% if env == "staging" %}
    None
{% endif %}
]
hashed_directories = True
comps_filter_environments = False

# RUNROOT settings
runroot = True
runroot_channel = 'compose'
runroot_tag = 'f[[ release.version_int ]]-build'

# PKGSET
pkgset_source = 'koji' # koji, repos
pkgset_koji_tag = '[[ id ]]'
pkgset_koji_inherit = False
pkgset_allow_reuse = False
filter_system_release_packages = False

# GATHER
gather_method = 'deps'
gather_backend = 'dnf'
check_deps = False
greedy_method = 'build'
repoclosure_backend = 'dnf'

# CREATEREPO
createrepo_c = True
createrepo_checksum = 'sha256'
createrepo_deltas = [
    ('^Everything$', {'*': True})
]
createrepo_database = True
[% if release.version_int >= 30 %]
createrepo_extra_args = ['--zck', '--zck-dict-dir=/usr/share/fedora-repo-zdicts/f[[ release.version_int ]]']
[% endif %]
# For epel8 we want to use xz compression for repodata
# https://pagure.io/epel/issue/71
[% if release.version_int == 8 %]
createrepo_extra_args = ['--xz']
[% endif %]

# CHECKSUMS
media_checksums = ['sha256']
media_checksum_one_file = True
media_checksum_base_filename = 'Fedora-%(variant)s-%(version)s-%(date)s.%(respin)s-%(arch)s'
#jigdo
create_jigdo = False

additional_packages = [
    ('^Everything$', {
        '*': [
            '*',
            '*-debuginfo',
        ],
    }),
]
multilib = [
    ('^Everything$', {
        'x86_64': ['devel', 'runtime'],
         's390x': ['devel', 'runtime']
    })
]
filter_packages = []

# Note: If you change something here (affects updates for stable releases), also
# submit the same change to pungi-fedora (affects Rawhide/Branched composes),
# we want to keep them in sync:
# https://pagure.io/pungi-fedora/blob/main/f/fedora.conf
#
# format: {arch|*: [packages]}
multilib_blacklist = {
    '*': [
        'dmraid-devel',
        'ghc-*',
        'httpd',
        'httpd-devel',
        'java-1.5.0-gcj-devel',
        'java-1.6.0-openjdk-devel',
        'java-1.7.0-icedtea-devel',
        'java-1.7.0-openjdk-devel',
        'java-1.8.0-openjdk-devel',
        'kdeutils-devel',
        'kernel*',
        'kernel*debug*',
        'kernel-PAE*',
        'krb5-server',
        'krb5-server-ldap',
        'mkinitrd-devel',
        'mod_*',
        'mp',
        'php*',
        'php-devel',
        'tomcat-native',
        ],
}

# Note: If you change something here (affects updates for stable releases), also
# submit the same change to pungi-fedora (affects Rawhide/Branched composes),
# we want to keep them in sync:
# https://pagure.io/pungi-fedora/blob/main/f/fedora.conf
#
# format: {arch|*: [packages]}
multilib_whitelist = {
    '*': [
        '*-static',
        'apitrace-libs',
        'compiler-rt',
        'dssi-vst-wine',
        'fakechroot-libs',
        'fakeroot-libs',
        'glib-networking',
        'glx-utils',
        'ibus-gtk2',
        'ibus-gtk3',
        'ibus-libs',
        'iptables',
        'libflashsupport',
        'libgnat',
        'lmms-vst',
        'mangohud',
        'mariadb-connector-odbc',
        'mesa-vdpau-drivers',
        'mesa-vulkan-drivers',
        'mysql-connector-odbc',
        'nosync',
        'nspluginwrapper',
        'nvidia-query-resource-opengl-lib',
        'p11-kit-trust',
        'pam',
        'perl-libs',
        'pipewire',
        'postgresql-odbc',
        'redhat-lsb',
        'syslinux-extlinux-nonlinux',
        'syslinux-nonlinux',
        'syslinux-tftpboot',
        'systemd-pam',
        'valgrind',
        'vkBasalt',
        'wine',
        'wine-*',
        'yaboot',
        ],
}

createiso_skip = [
        ('^Everything$', {
            '*': True,
            'src': True
        }),
    ]

{% if env != "staging" %}
[% if release.id_prefix == 'FEDORA' %]
ostree = {
    "^Everything$": [
        # Fedora Silverblue
        {
            "version": "!VERSION_FROM_VERSION_DATE_RESPIN",
            "treefile": "fedora-silverblue.yaml",
            "config_url": "https://pagure.io/workstation-ostree-config.git",
            "config_branch": "f[[ release.version ]]",
            "repo": [
                "Everything",
                [% if request.name == 'testing' %]
                    # In the case of testing, also inject the last stable updates
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",
                [% endif %]
                # For F37 the compose location is going to be under /compose/branched/
                [% if release.version_int == 37 %]
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"
                [% else %]
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"
                [% endif %]
            ]
            "ostree_repo": "/mnt/koji/compose/ostree/repo",
            [% if request.name == 'stable' %]
                "ostree_ref": "fedora/[[ release.version_int ]]/${basearch}/updates/silverblue",
            [% else %]
                "ostree_ref": "fedora/[[ release.version_int ]]/${basearch}/testing/silverblue",
            [% endif %]
            "tag_ref": False,
            "arches": ["x86_64", "ppc64le", "aarch64" ],
            "failable": ["x86_64", "ppc64le", "aarch64" ]
        },
        # Fedora Kinoite
        [% if release.version_int >= 35 %]
        {
            "version": "!VERSION_FROM_VERSION_DATE_RESPIN",
            "treefile": "fedora-kinoite.yaml",
            "config_url": "https://pagure.io/workstation-ostree-config.git",
            "config_branch": "f[[ release.version ]]",
            "repo": [
                "Everything",
                [% if request.name == 'testing' %]
                    # In the case of testing, also inject the last stable updates
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/updates/f[[ release.version_int ]]-updates/compose/Everything/$basearch/os/",
                [% endif %]
                # For F37 the compose location is going to be under /compose/branched/
                [% if release.version_int == 37 %]
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/branched/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"
                [% else %]
                    "https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/[[ release.version_int ]]/latest-Fedora-[[ release.version_int ]]/compose/Everything/$basearch/os/"
                [% endif %]
            ]
            "ostree_repo": "/mnt/koji/compose/ostree/repo",
            [% if request.name == 'stable' %]
                "ostree_ref": "fedora/[[ release.version_int ]]/${basearch}/updates/kinoite",
            [% else %]
                "ostree_ref": "fedora/[[ release.version_int ]]/${basearch}/testing/kinoite",
            [% endif %]
            "tag_ref": False,
            "arches": ["x86_64", "ppc64le", "aarch64" ],
            "failable": ["x86_64", "ppc64le", "aarch64" ]
        },
        [% endif %]
    ]
}
[% endif %]

{% endif %}

translate_paths = [
   ('/mnt/koji/compose/', 'https://kojipkgs{{ env_suffix }}.fedoraproject.org/compose/'),
]
koji_profile = 'bodhi_koji'
link_type = 'hardlink-or-copy'
